SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

CREATE PROCEDURE dbo.[DnnProduct_CDS_RedemptionCodesRestore]
	@RequestID int
AS
BEGIN
	INSERT INTO dbo.[DnnProduct_CDS_RedemptionCodesAvailable] (code)
	SELECT RedemptionCode
	FROM dbo.[DnnProduct_CDS_RedemptionCodes]
	WHERE RequestID = @RequestID

	DELETE
	FROM dbo.[DnnProduct_CDS_RedemptionCodes]
	WHERE RequestID = @RequestID
END
GO
